\(\int \frac {\sec (x)}{(a-a \sin ^2(x))^2} \, dx\) [278]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 35 \[ \int \frac {\sec (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx=\frac {3 \text {arctanh}(\sin (x))}{8 a^2}+\frac {3 \sec (x) \tan (x)}{8 a^2}+\frac {\sec ^3(x) \tan (x)}{4 a^2} \]

[Out]

3/8*arctanh(sin(x))/a^2+3/8*sec(x)*tan(x)/a^2+1/4*sec(x)^3*tan(x)/a^2

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3254, 3853, 3855} \[ \int \frac {\sec (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx=\frac {3 \text {arctanh}(\sin (x))}{8 a^2}+\frac {\tan (x) \sec ^3(x)}{4 a^2}+\frac {3 \tan (x) \sec (x)}{8 a^2} \]

[In]

Int[Sec[x]/(a - a*Sin[x]^2)^2,x]

[Out]

(3*ArcTanh[Sin[x]])/(8*a^2) + (3*Sec[x]*Tan[x])/(8*a^2) + (Sec[x]^3*Tan[x])/(4*a^2)

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \sec ^5(x) \, dx}{a^2} \\ & = \frac {\sec ^3(x) \tan (x)}{4 a^2}+\frac {3 \int \sec ^3(x) \, dx}{4 a^2} \\ & = \frac {3 \sec (x) \tan (x)}{8 a^2}+\frac {\sec ^3(x) \tan (x)}{4 a^2}+\frac {3 \int \sec (x) \, dx}{8 a^2} \\ & = \frac {3 \text {arctanh}(\sin (x))}{8 a^2}+\frac {3 \sec (x) \tan (x)}{8 a^2}+\frac {\sec ^3(x) \tan (x)}{4 a^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.86 \[ \int \frac {\sec (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx=\frac {\frac {3}{8} \text {arctanh}(\sin (x))+\frac {3}{8} \sec (x) \tan (x)+\frac {1}{4} \sec ^3(x) \tan (x)}{a^2} \]

[In]

Integrate[Sec[x]/(a - a*Sin[x]^2)^2,x]

[Out]

((3*ArcTanh[Sin[x]])/8 + (3*Sec[x]*Tan[x])/8 + (Sec[x]^3*Tan[x])/4)/a^2

Maple [A] (verified)

Time = 0.54 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.23

method result size
parallelrisch \(\frac {3 \ln \left (-\cot \left (x \right )+\csc \left (x \right )+1\right )-3 \ln \left (-\cot \left (x \right )+\csc \left (x \right )-1\right )+3 \sec \left (x \right ) \tan \left (x \right )+2 \tan \left (x \right ) \left (\sec ^{3}\left (x \right )\right )}{8 a^{2}}\) \(43\)
default \(\frac {-\frac {1}{16 \left (1+\sin \left (x \right )\right )^{2}}-\frac {3}{16 \left (1+\sin \left (x \right )\right )}+\frac {3 \ln \left (1+\sin \left (x \right )\right )}{16}+\frac {1}{16 \left (\sin \left (x \right )-1\right )^{2}}-\frac {3}{16 \left (\sin \left (x \right )-1\right )}-\frac {3 \ln \left (\sin \left (x \right )-1\right )}{16}}{a^{2}}\) \(52\)
risch \(-\frac {i \left (3 \,{\mathrm e}^{7 i x}+11 \,{\mathrm e}^{5 i x}-11 \,{\mathrm e}^{3 i x}-3 \,{\mathrm e}^{i x}\right )}{4 \left ({\mathrm e}^{2 i x}+1\right )^{4} a^{2}}-\frac {3 \ln \left ({\mathrm e}^{i x}-i\right )}{8 a^{2}}+\frac {3 \ln \left ({\mathrm e}^{i x}+i\right )}{8 a^{2}}\) \(74\)
norman \(\frac {\frac {5 \tan \left (\frac {x}{2}\right )}{4 a}+\frac {3 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{4 a}+\frac {3 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{4 a}+\frac {5 \left (\tan ^{7}\left (\frac {x}{2}\right )\right )}{4 a}}{\left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )^{4} a}-\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{8 a^{2}}+\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )+1\right )}{8 a^{2}}\) \(83\)

[In]

int(sec(x)/(a-a*sin(x)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/8*(3*ln(-cot(x)+csc(x)+1)-3*ln(-cot(x)+csc(x)-1)+3*sec(x)*tan(x)+2*tan(x)*sec(x)^3)/a^2

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.31 \[ \int \frac {\sec (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx=\frac {3 \, \cos \left (x\right )^{4} \log \left (\sin \left (x\right ) + 1\right ) - 3 \, \cos \left (x\right )^{4} \log \left (-\sin \left (x\right ) + 1\right ) + 2 \, {\left (3 \, \cos \left (x\right )^{2} + 2\right )} \sin \left (x\right )}{16 \, a^{2} \cos \left (x\right )^{4}} \]

[In]

integrate(sec(x)/(a-a*sin(x)^2)^2,x, algorithm="fricas")

[Out]

1/16*(3*cos(x)^4*log(sin(x) + 1) - 3*cos(x)^4*log(-sin(x) + 1) + 2*(3*cos(x)^2 + 2)*sin(x))/(a^2*cos(x)^4)

Sympy [F]

\[ \int \frac {\sec (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx=\frac {\int \frac {\sec {\left (x \right )}}{\sin ^{4}{\left (x \right )} - 2 \sin ^{2}{\left (x \right )} + 1}\, dx}{a^{2}} \]

[In]

integrate(sec(x)/(a-a*sin(x)**2)**2,x)

[Out]

Integral(sec(x)/(sin(x)**4 - 2*sin(x)**2 + 1), x)/a**2

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.63 \[ \int \frac {\sec (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx=-\frac {3 \, \sin \left (x\right )^{3} - 5 \, \sin \left (x\right )}{8 \, {\left (a^{2} \sin \left (x\right )^{4} - 2 \, a^{2} \sin \left (x\right )^{2} + a^{2}\right )}} + \frac {3 \, \log \left (\sin \left (x\right ) + 1\right )}{16 \, a^{2}} - \frac {3 \, \log \left (\sin \left (x\right ) - 1\right )}{16 \, a^{2}} \]

[In]

integrate(sec(x)/(a-a*sin(x)^2)^2,x, algorithm="maxima")

[Out]

-1/8*(3*sin(x)^3 - 5*sin(x))/(a^2*sin(x)^4 - 2*a^2*sin(x)^2 + a^2) + 3/16*log(sin(x) + 1)/a^2 - 3/16*log(sin(x
) - 1)/a^2

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.34 \[ \int \frac {\sec (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx=\frac {3 \, \log \left (\sin \left (x\right ) + 1\right )}{16 \, a^{2}} - \frac {3 \, \log \left (-\sin \left (x\right ) + 1\right )}{16 \, a^{2}} - \frac {3 \, \sin \left (x\right )^{3} - 5 \, \sin \left (x\right )}{8 \, {\left (\sin \left (x\right )^{2} - 1\right )}^{2} a^{2}} \]

[In]

integrate(sec(x)/(a-a*sin(x)^2)^2,x, algorithm="giac")

[Out]

3/16*log(sin(x) + 1)/a^2 - 3/16*log(-sin(x) + 1)/a^2 - 1/8*(3*sin(x)^3 - 5*sin(x))/((sin(x)^2 - 1)^2*a^2)

Mupad [B] (verification not implemented)

Time = 13.47 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.89 \[ \int \frac {\sec (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx=\frac {3\,\mathrm {atanh}\left (\sin \left (x\right )\right )}{8\,a^2}+\frac {3\,\sin \left (x\right )}{8\,a^2\,{\cos \left (x\right )}^2}+\frac {\sin \left (x\right )}{4\,a^2\,{\cos \left (x\right )}^4} \]

[In]

int(1/(cos(x)*(a - a*sin(x)^2)^2),x)

[Out]

(3*atanh(sin(x)))/(8*a^2) + (3*sin(x))/(8*a^2*cos(x)^2) + sin(x)/(4*a^2*cos(x)^4)